/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package jse;

import java.lang.management.ManagementFactory;
import java.lang.management.RuntimeMXBean;
import java.util.List;

/**
 *
 * @author WangShuai
 */
public class JMXTest {
    public static void main(String[] args) {
        RuntimeMXBean runtimemxBean = ManagementFactory.getRuntimeMXBean();
        System.out.println(runtimemxBean.getName());   // the name representing the running Java virtual machine:1080@wangshuaipc
        System.out.println(runtimemxBean.getVmName()); //Java HotSpot(TM) Client VM
        List<String> argList = runtimemxBean.getInputArguments();
        System.out.println(argList.size());
        for(String arg : argList){
            System.out.println(arg);
        }
    }
}
